package com.network.mapper;

import com.network.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Insert("insert into user(username,password,create_time) values (#{username},#{password},#{createTime})")
    void insert(User user);

    @Select("select id,username,password,state,type,create_time,last_login_time,last_off_time from user where username=#{username} and password=#{password}")
    User getByUsernameAndPassword(User user);
}
